package com.dream.wukong.common.core.jdbc.dialect.impl;

import com.dream.wukong.common.core.jdbc.dialect.Dialect;

import java.util.Map;

/**
 * @Author: wuyichao
 *  * 获取基于MYSQL数据库的分页语句
 * @Description:
 * @Date: Created in 10:10 2018/9/18.
 * @Modified:
 */
public class MySQLDialect extends Dialect {


    public String getPageSql(String sql, int offset, int limit,
                             Map<String, Object> map) {
        map.put("offset", offset);
        map.put("limit", limit);
        return (new StringBuffer(sql.length() + 20)).append(sql)
                .append(" limit  :offset , :limit ").toString();
    }
}